class SystemOperatorsController < ApplicationController
  
  # GET /system_operators
  # GET /system_operators.xml
  def index
    @system_operators = SystemOperator.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @system_operators }
    end
  end

  # GET /system_operators/1
  # GET /system_operators/1.xml
  def show
    @system_operator = SystemOperator.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @system_operator }
    end
  end

  # GET /system_operators/new
  # GET /system_operators/new.xml
  def new
    @system_operator = SystemOperator.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @system_operator }
    end
  end

  # GET /system_operators/1/edit
  def edit
    @system_operator = SystemOperator.find(params[:id])
  end

  # POST /system_operators
  # POST /system_operators.xml
  def create
    @system_operator = SystemOperator.new(params[:system_operator])

    respond_to do |format|
      if @system_operator.save
        flash[:notice] = 'SystemOperator was successfully created.'
        format.html { redirect_to(@system_operator) }
        format.xml  { render :xml => @system_operator, :status => :created, :location => @system_operator }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @system_operator.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /system_operators/1
  # PUT /system_operators/1.xml
  def update
    @system_operator = SystemOperator.find(params[:id])

    respond_to do |format|
      if @system_operator.update_attributes(params[:system_operator])
        flash[:notice] = 'SystemOperator was successfully updated.'
        format.html { redirect_to(@system_operator) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @system_operator.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /system_operators/1
  # DELETE /system_operators/1.xml
  def destroy
    @system_operator = SystemOperator.find(params[:id])
    @system_operator.destroy

    respond_to do |format|
      format.html { redirect_to(system_operators_url) }
      format.xml  { head :ok }
    end
  end
end
